<!--
 * @Author: Meow
 * @Date: 2019-09-26 09:45:12
 * @LastEditors: Meow
 * @LastEditTime: 2019-10-10 13:39:48
 * @Description: 数据库资源注册
 -->
<template>
  <div id="Main">
    <h1>文件服务器资源注册</h1>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="系统名称：" v-for="(item,index) in form" :key="index">
        <el-input v-if="item.type==0" v-model="item.value"></el-input>
        <el-select v-if="item.type==1" v-model="item.value" placeholder="请选择">
          <el-option v-for="v in item.options" :key="v.value" :label="v.label" :value="v.value"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "Database",
  props: {
    active: Number,
    default: 0
  },
  data() {
    return {
      form: [
        {
          name: "所属系统",
          type: 1,
          value: "",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "所属系统",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "所属系统",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "所属系统",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        }
      ],
      defaultProps: {
        children: "children",
        label: "label"
      }
    };
  },
  methods: {}
};
</script>
<style lang="less" scoped>
@import url("../MetadataRegistration.less");
</style>
